package shiqi.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import shiqi.entity.Superman;
import shiqi.service.superman.SupermanService;

import java.util.List;

/**
 * @author shiqi
 * @version 1.0.0
 * @ClassName SupermanController.java
 * @Description
 * @createTime 2022-05-06
 */
@RestController
public class SupermanController {

    @Autowired
    private SupermanService supermanService;

    @RequestMapping("/getAllSuperman")
    public List getAllSuperman() {
        // supermanService才是重点，接下来演示三种全量嵌套查询的方法
        List<Superman> list = supermanService.getAllSuperman2();
        return list;
    }
}
